package com.saltlux.tdd.algorithm;

import java.util.Comparator;

import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;


public class StringValueComparatorTester {
	private StringValueComparator comparator; 
	@Before
	public void before() {
		comparator = new StringValueComparator();
	}
	
	@Test
	public void testClassType() {
		Assert.assertTrue(comparator instanceof Comparator);
	}
	
	@Test
	public void testComparingValues(){
		String value1 = "1";
		String value2 = "2";
		
		Assert.assertTrue(comparator.compare(value1, value2)<0);
		Assert.assertTrue(comparator.compare(value2, value1)>0);
		Assert.assertTrue(comparator.compare(value1, value1)==0);
	}
}
